package com.diaohw.platform.remote.auth.obj.bo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@Schema(name = "Account VO", description = "用户 VO")
public class AccountInfoBO implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Setter
    @Schema(description = "用户信息")
    private AccountBO account;

    @Schema(description = "部门")
    private DepartmentBO department;

    @Schema(description = "角色")
    private List<RoleBO> roles;

    @Schema(description = "权限")
    private List<PermissionBO> permissions;

    @Schema(description = "菜单")
    private List<MenuBO> menus;

    @Schema(description = "登录时间")
    private LocalDateTime loginTime;

    @Builder
    public AccountInfoBO(AccountBO account, DepartmentBO department, List<RoleBO> roles, List<PermissionBO> permissions, List<MenuBO> menus) {
        this.account = account;
        this.department = department;
        this.roles = roles;
        this.permissions = permissions;
        this.menus = menus;
    }
}